package main

import (
	"errors"
	"fmt"
)

func Div1(a, b int) (c int, err error) {
	if b == 0 {
		err = errors.New("除数为0")
		return
	}
	return
}

func main() {
	div1, err := Div1(1, 0)
	if err != nil {
		fmt.Println("err = ", err)
	} else {
		fmt.Println("result = ", div1)
	}
}
